﻿/*------------------------------------------------------------------
-- COPYRIGHT (C) 2010-2012  Atom
-- ALL RIGHTS RESERVED.
-- 兆尹科技
-- CREATE DATE: 2010/07/12
-- CREATE MAN:	姜新军
-- 数据库一个字段的结构信息
-- MODIFY HISTORY:
-- MODIFY DATE:
-- MODIFY MAN:	
-- MODIFY DESC:
-- MODIFY DATE:
-- MODIFY MAN:	
-- MODIFY DESC:
---------------------------------------------------------------------*/

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Atom.Entity
{
    /// <summary>
    /// 数据库一个字段的结构信息
    /// </summary>
    public class DatabaseColumnStruct
    {
        /// <summary>
        /// 字段名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 字段类型
        /// </summary>
        public Type DbType { get; set; }

        /// <summary>
        /// 字段在数据库中的类型名称
        /// </summary>
        public string DbTypeName { get; set; }

        /// <summary>
        /// 字段大小
        /// </summary>
        public int Size { get; set; }

        /// <summary>
        /// 是否允许为空
        /// </summary>
        public bool AllowDBNull { get; set; }

        /// <summary>
        /// 是否为主键
        /// </summary>
        public bool IsIdentity { get; set; }

        /// <summary>
        /// 字段的序号
        /// </summary>
        public int ColumnIndex { get; set; }
    }
}
